﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using PB.FBConnect;
using System.Web.Security;

namespace PB.FBMembershipWebApp.Mem
{
    public partial class MyFBInfo : System.Web.UI.Page
    {

        public FBUser fbUser;
        public string location = string.Empty;
        protected void Page_Load(object sender, EventArgs e)
        {
            fbUser = Membership.GetUser() as FBUser;
            if (fbUser != null && fbUser.FacebookUser != null && fbUser.FacebookUser.uid.Value > 0)
            {

                location = fbUser.FacebookUser.current_location.city + " " + fbUser.FacebookUser.current_location.state + " ";
                location += fbUser.FacebookUser.current_location.country + " " + fbUser.FacebookUser.current_location.zip;


            }
            else
            {
                PlaceHolderFBInfo.Visible = false;
            }
        }
    }
}
